home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat5 / libelfutil.z / libelfutil
Encoding:
Text File  |  1998-10-30  |  12.3 KB  |  199 lines

  1.  
  2.  
  3.  
  4. LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))                                                    LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      libelfutil - library for xlate sections and leb128 numbers.
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<lllliiiibbbbXXXXllllaaaatttteeee....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ccccmmmmppppllllrrrrssss////lllleeeebbbb111122228888....hhhh>>>>
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      This library is a collection of functions which are perhaps best thought
  17.      of as three groups:  the xlate functions used to create and access the
  18.      .MIPS.xlate and related sections, the leb128 functions, and a disassembly
  19.      function (undocumented).
  20.  
  21.      The following is a description of the xlate routines.  The xlate routines
  22.      are used to create and access addresses translation data  as described in
  23.      _x_l_a_t_e(4).
  24.  
  25.      Calls used to create address translation data are called "producer"
  26.      calls.  Calls used to create applications that read the address
  27.      translation data are called "consumer" calls.
  28.  
  29.      Use -lelfutil  -lelf on the link command line to link  in _l_i_b_e_l_f_u_t_i_l.
  30.  
  31.      All call interfaces described here pass and return values sufficient for
  32.      both 32 and 64 bit executables and DSOs.  On disk the data format is
  33.      slightly different for 32 and 64 bit executables and DSOs but there is
  34.      only one library interface.
  35.  
  36. xxxxllllaaaatttteeee CCCCoooonnnnssssuuuummmmeeeerrrr IIIInnnntttteeeerrrrffffaaaacccceeee
  37.      The xlate consumer interface is used by debuggers and other tools that
  38.      wish to know, for a transformed executable or DSO, what given execution
  39.      time addresses were in the original program text (executable
  40.      instructions).  Or that wish to know, for a given address taken from the
  41.      debugging information, what address this represents in the transformed
  42.      text (the debugging information is not changed by transformations, so the
  43.      debugging information give addresses which are not identical to the
  44.      executing transformed text).
  45.  
  46.      All code here ignores return values to keep the examples small.
  47.  
  48.      This example gets the untransformed address for a range of transformed
  49.      addresses.
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))                                                    LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))
  71.  
  72.  
  73.  
  74.           _iiii_nnnn_tttt _rrrr_eeee_ssss_uuuu_llll_tttt_;;;;
  75.           _xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee _==== _0000_;;;;
  76.           _xxxx_llll_aaaa_tttt_eeee______bbbb_llll_oooo_cccc_kkkk _rrrr_aaaa_nnnn_gggg_eeee_;;;;
  77.           _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______iiii_nnnn_iiii_tttt______ffff_dddd_((((_mmmm_yyyy_oooo_pppp_eeee_nnnn_ffff_dddd_,,,,
  78.             _XXXX_LLLL_AAAA_TTTT_EEEE______OOOO_PPPP_EEEE_NNNN______SSSS_TTTT_DDDD______TTTT_AAAA_BBBB_LLLL_EEEE_,,,,_&&&&_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_))))_;;;;
  79.           _ffff_oooo_rrrr_((((_pppp_cccc _==== _ssss_tttt_aaaa_rrrr_tttt_pppp_cccc_;;;; _pppp_cccc _<<<<_eeee_nnnn_dddd_pppp_cccc_;;;; _pppp_cccc _++++_==== _4444_))))
  80.           _{{{{
  81.               _EEEE_llll_ffff_6666_4444______AAAA_dddd_dddd_rrrr _oooo_llll_dddd_aaaa_dddd_dddd_rrrr_eeee_ssss_ssss_;;;;
  82.               _xxxx_llll_aaaa_tttt_eeee______BBBB_llll_oooo_cccc_kkkk _rrrr_aaaa_nnnn_gggg_eeee_;;;;
  83.                   _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______aaaa_dddd_dddd_rrrr_eeee_ssss_ssss_((((_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_,,,,
  84.                     _XXXX_LLLL_AAAA_TTTT_EEEE______AAAA_DDDD_DDDD_RRRR_EEEE_SSSS_SSSS______IIII_NNNN_PPPP_UUUU_TTTT______NNNN_EEEE_WWWW______AAAA_DDDD_DDDD_RRRR_EEEE_SSSS_SSSS_,,,,
  85.                     _pppp_cccc_,,,,_&&&&_oooo_llll_dddd_aaaa_dddd_dddd_rrrr_eeee_ssss_ssss_,,,,_&&&&_rrrr_aaaa_nnnn_gggg_eeee_))))_;;;;
  86.               _...._...._...._dddd_oooo _ssss_oooo_mmmm_eeee_tttt_hhhh_iiii_nnnn_gggg _uuuu_ssss_eeee_ffff_uuuu_llll _hhhh_eeee_rrrr_eeee_...._...._....
  87.           _}}}}
  88.           _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______ffff_iiii_nnnn_iiii_ssss_hhhh_((((_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_))))_;;;;
  89.  
  90. xxxxllllaaaatttteeee PPPPrrrroooodddduuuucccceeeerrrr IIIInnnntttteeeerrrrffffaaaacccceeee
  91.      The xlate producer interface is used by transforming applications (like
  92.      _c_o_r_d(1) and _p_i_x_i_e(1)) to register the transformations so other tools
  93.      (like _d_b_x(1)) can, at execution time, use the CCCCoooonnnnssssuuuummmmeeeerrrr IIIInnnntttteeeerrrrffffaaaacccceeee to help
  94.      the tool user understand the transformed text.
  95.  
  96.      This example records a trivial transformation and gets back the
  97.      transformed bytes.
  98.  
  99.           _iiii_nnnn_tttt _rrrr_eeee_ssss_uuuu_llll_tttt_;;;;
  100.           _xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee _==== _0000_;;;;
  101.           _xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______pppp_rrrr_oooo _pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee _==== _0000_;;;;
  102.           _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______iiii_nnnn_iiii_tttt_((((_&&&&_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,_xxxx_llll_aaaa_tttt_eeee______tttt_kkkk______gggg_eeee_nnnn_eeee_rrrr_aaaa_llll_,,,,_cccc_oooo_nnnn_tttt_aaaa_bbbb_llll_eeee_,,,,
  103.               _////_****_iiii_ssss_6666_4444_bbbb_iiii_tttt_==== _****_////_0000_))))_;;;;
  104.           _////_**** _tttt_hhhh_eeee _ssss_iiii_nnnn_gggg_llll_eeee _tttt_rrrr_aaaa_nnnn_ssss_ffff_oooo_rrrr_mmmm_aaaa_tttt_iiii_oooo_nnnn _****_////
  105.           _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______aaaa_dddd_dddd______rrrr_aaaa_nnnn_gggg_eeee_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,_nnnn_eeee_wwww_pppp_cccc_,,,,_nnnn_eeee_wwww_rrrr_aaaa_nnnn_gggg_eeee_,,,,
  106.                   _oooo_llll_dddd_pppp_cccc_,,,, _oooo_llll_dddd_rrrr_aaaa_nnnn_gggg_eeee_))))_;;;;
  107.           _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______dddd_iiii_ssss_kkkk______hhhh_eeee_aaaa_dddd_eeee_rrrr_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,
  108.               _XXXX_LLLL_AAAA_TTTT_EEEE______PPPP_RRRR_OOOO______SSSS_TTTT_AAAA_NNNN_DDDD_AAAA_RRRR_DDDD______SSSS_EEEE_TTTT_UUUU_PPPP_,,,,
  109.               _&&&&_tttt_oooo_tttt_aaaa_llll_mmmm_eeee_mmmm_oooo_rrrr_yyyy_,,,, _&&&&_nnnn_uuuu_mmmm_bbbb_llll_oooo_cccc_kkkk_ssss_))))_;;;;
  110.           _ffff_oooo_rrrr_((((_iiii _==== _0000_;;;; _iiii _<<<< _nnnn_uuuu_mmmm_bbbb_llll_oooo_cccc_kkkk_ssss_;;;; _++++_++++_iiii_))))
  111.           _{{{{
  112.               _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______dddd_iiii_ssss_kkkk______nnnn_eeee_xxxx_tttt______bbbb_llll_oooo_cccc_kkkk_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_,,,,
  113.                   _&&&&_dddd_aaaa_tttt_aaaa_,,,,_&&&&_dddd_aaaa_tttt_aaaa_ssss_iiii_zzzz_eeee_))))_;;;;
  114.               _////_**** _dddd_oooo _ssss_oooo_mmmm_eeee_tttt_hhhh_iiii_nnnn_gggg _wwww_iiii_tttt_hhhh _dddd_aaaa_tttt_aaaa_ssss_iiii_zzzz_eeee _bbbb_yyyy_tttt_eeee_ssss _aaaa_tttt _aaaa_dddd_dddd_rrrr_eeee_ssss_ssss _dddd_aaaa_tttt_aaaa _****_////
  115.               _ffff_rrrr_eeee_eeee_((((_dddd_aaaa_tttt_aaaa_))))_;;;;
  116.           _}}}}
  117.           _rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______pppp_rrrr_oooo______ffff_iiii_nnnn_iiii_ssss_hhhh_((((_pppp_rrrr_oooo_tttt_aaaa_bbbb_llll_eeee_))))_;;;;
  118.  
  119.      You must install the _c_o_m_p_i_l_e_r__e_o_e._h_d_r._i_n_t_e_r_n_a_l subsystem to get the
  120.      headers necessary to work with the xlate functions and leb128 functions
  121.      they call.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))                                                    LLLLIIIIBBBBEEEELLLLFFFFUUUUTTTTIIIILLLL((((5555))))
  137.  
  138.  
  139.  
  140. FILES
  141.      /usr/include/libXlate.h
  142.      /usr/include/cmplrs/xlate.h
  143.      /usr/include/elf.h
  144.      /usr/include/dwarf.h
  145.      /usr/include/libdwarf.h
  146.      /usr/lib/libelfutil.a
  147.  
  148. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  149.      xlate(4), xlate_init_fd(3e), xlate_pro_init(3e)
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.